package cn.darkhorse.workorder.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.darkhorse.workorder.mapper.QmsWorkorderSenseMapper;
import cn.darkhorse.workorder.domain.QmsWorkorderSense;
import cn.darkhorse.workorder.service.IQmsWorkorderSenseService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 感官检验Service业务层处理
 *
 * @author ytq
 * @date 2024-07-19
 */
@Service
public class QmsWorkorderSenseServiceImpl extends ServiceImpl<QmsWorkorderSenseMapper, QmsWorkorderSense> implements IQmsWorkorderSenseService
{



    @Override
    public QmsWorkorderSense getByOrderNumber(String orderNumber) {
        return lambdaQuery().eq(QmsWorkorderSense::getOrderNumber, orderNumber).one();
    }


    /**
     * 新增感官检验
     *
     * @param qmsWorkorderSense 感官检验
     * @return 结果
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean saveQmsWorkorderSense(QmsWorkorderSense qmsWorkorderSense) {

        return  saveOrUpdate(qmsWorkorderSense);
    }


}
